
import { ComsatScanGraphics } from './ComsatScan/ComsatScan.Graphics'
import { ComsatScanPrimitive } from './ComsatScan/ComsatScan.Primitive'
import { ComsatScanVisualizer } from './ComsatScan/ComsatScan.Visualizer'

import { RectangularSensorGraphics } from './RectangularSensor/RectangularSensor.Graphics'
import { RectangularSensorPrimitive } from './RectangularSensor/RectangularSensor.Primitive'
import { RectangularSensorVisualizer } from './RectangularSensor/RectangularSensor.Visualizer'

import { HighPowerGraphics } from './HighPower/HighPower.Graphics'
import { HighPowerPrimitive } from './HighPower/HighPower.Primitive'
import { HighPowerVisualizer } from './HighPower/HighPower.Visualizer'

import { RadarSensorGraphics } from './RadarSensor/RadarSensor.Graphics'
import { RadarSensorPrimitive } from './RadarSensor/RadarSensor.Primitive'
import { RadarSensorVisualizer } from './RadarSensor/RadarSensor.Visualizer' 

//ComsatScan 卫星扫描区域
Cesium.ComsatScanGraphics = ComsatScanGraphics;
Cesium.ComsatScanPrimitive = ComsatScanPrimitive;
Cesium.ComsatScanVisualizer = ComsatScanVisualizer;

//RectangularSensor 相控雷达
Cesium.RectangularSensorPrimitive = RectangularSensorPrimitive;
Cesium.RectangularSensorGraphics = RectangularSensorGraphics;
Cesium.RectangularSensorVisualizer = RectangularSensorVisualizer;

//HighPower 大功率雷达
Cesium.HighPowerGraphics = HighPowerGraphics;
Cesium.HighPowerPrimitive = HighPowerPrimitive;
Cesium.HighPowerVisualizer = HighPowerVisualizer;

// RadarSensor 雷达扫描 （真）
Cesium.RadarSensorGraphics = RadarSensorGraphics;
Cesium.RadarSensorPrimitive = RadarSensorPrimitive;
Cesium.RadarSensorVisualizer = RadarSensorVisualizer;

var DataSourceDisplay = Cesium.DataSourceDisplay;
var originalDefaultVisualizersCallback = DataSourceDisplay.defaultVisualizersCallback;
DataSourceDisplay.defaultVisualizersCallback = function (scene, entityCluster, dataSource) {
    var entities = dataSource.entities;
    var array = originalDefaultVisualizersCallback(scene, entityCluster, dataSource);
    return array.concat([new RectangularSensorVisualizer(scene, entities), new ComsatScanVisualizer(scene, entities), new HighPowerVisualizer(scene, entities), new RadarSensorVisualizer(scene, entities)]);
};
